<?php
require_once("../../inc/global.php");
require_once("../menusys/function.php");
require_once("function.php");
adminislogin();
$MenuID=$_GET["MenuID"];
$html->includetop("分类管理"," style=\"padding-right:10px;width:96%;\"");

//获取配置
$FromSet_Config_Arr1=$System->GetMenuSysField($MenuID,4);
$FromSet_Config_Arr2=$System->GetMenuSysField($MenuID,5);
$MenuIDFieldID=$System->GetFormConfigMenuIDFieldID($MenuID);  //获取MenuID所在字段序号
if(empty($MenuIDFieldID)){
	YKT_error('你还没有设置MenuID',$_SERVER['HTTP_REFERER']);
	exit();
}

//获取列表
$FromSet_Config_ShowList=explode(",",$FromSet_Config_Arr2);
$FromSet_Config_ShowListArr=explode("|",$FromSet_Config_ShowList[0]);
$FromSet_Config_ShowListDefault=explode(",",$FromSet_Config_Arr1);

echo "当前位置：{$System->GetMenuSysField($System->GetMenuSysField($MenuID,2),1)} > {$System->GetMenuSysField($MenuID,1)}<br>";
echo "<a href=\"classsys_add.php?MenuID={$MenuID}&Superior=0\" style=\"line-height:30px; font-size:14px;\"><strong>添加{$System->GetMenuSysField($MenuID,1)}>></strong></a><table width=\"100%\" align=\"center\" border=\"0\" class=\"YKTtable\" style=\" background-color:#ebebeb\" cellspacing=\"1\" cellpadding=\"0\">\n<tr style=\" height:40px; padding-left:10px; color:#FFF; background:#6f7783\">\n";
 //标题
$colspan=1;
$Data_ShowList_Count=count($FromSet_Config_ShowListArr);
for($i=0;$i<$Data_ShowList_Count;$i++){
	
	$FromSet_Config_ShowListDefaultArr=explode("|",$FromSet_Config_ShowListDefault[$FromSet_Config_ShowListArr[$i]]);
	if($FromSet_Config_ShowListArr[$i]==0){
		echo "<td height=\"40\" width=\"70\" style=\"font-size:14px\" align=\"center\"><strong>{$FromSet_Config_ShowListDefaultArr[0]}</strong></td>\n";
	}elseif($FromSet_Config_ShowListArr[$i]==3){
		echo "<td height=\"40\" width=\"100\" style=\"font-size:14px\" align=\"center\"><strong>{$FromSet_Config_ShowListDefaultArr[0]}</strong></td>\n";
	}else{
		echo "<td height=\"40\" style=\"font-size:14px; padding-left:10px;\" align=\"left\"><strong>{$FromSet_Config_ShowListDefaultArr[0]}</strong></td>\n";
	}
	$colspan=$colspan+1;
}
echo "<td width=\"140\" height=\"40\" style=\"font-size:14px\" align=\"center\" ><strong>操作</strong></td>\n";
echo "</tr>";

$Data_result=$db->query("select * from classsys where classsys{$MenuIDFieldID}={$MenuID} Order by classsys5 Asc,classsys3 Asc");
$DataClassListArr=$db->GetDatalist($Data_result);
$xiajicount=$FromSet_Config_ShowList[6];
if($xiajicount==-1){
	$xiajicount=1;
}
showclasslist($MenuID,$DataClassListArr,$FromSet_Config_ShowList[0],$FromSet_Config_ShowListDefault,$xiajicount);

echo "</table>";
echo '<script type="text/javascript">
function moveimg(t,event,id){
	var img = document.getElementById(id);
	img.style.display="";
	img.innerHTML="<img src=\""+t.src+"\" width=\"250\" />";
	img.style.left=(document.documentElement.scrollLeft+event.clientX+12)+"px";
	img.style.top=(document.documentElement.scrollTop+event.clientY+12)+"px";
}
function outimg(id){
	var img = document.getElementById(id);
	img.style.display="none";
}
</script>
<div style="border: solid 1px #ccc; z-index:100; display:none; position:absolute;" id="showimgdiv"></div>';
$html->includeend();
?>
